﻿using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace TongHopBCTuan2014
{
    class readfileBCTuan
    {
        public string readb(string path)
        {
            //string path = @"c:\w301013.T11";

            // This text is added only once to the file. 
            //if (!File.Exists(path))
            //{
            //    // Create a file to write to. 
            //    string createText = "Hello and Welcome" + Environment.NewLine;
            //    File.WriteAllText(path, createText);
            //}

            // This text is always added, making the file longer over time 
            // if it is not deleted. 
            //string appendText = "This is extra text" + Environment.NewLine;
            //File.AppendAllText(path, appendText);

            // Open the file to read from.
            string s = "";
            string readText = File.ReadAllText(path);

            for (int i = 0; i < readText.Length - 1; i++)
                if (readText[i] > 0 && readText[i] < 255)
                    s += readText[i].ToString();
            //s = readText;
            return s;

        }
        public List<data> getdataeach(string s)
        {
            List<string> huyen = new List<string>();
            for (int i = 0; i < s.Length / 255; i++)

                huyen.Add(s.Substring(i * 255, 254));

            
            


            List<data> dataHuyen = new List<data>();
            


            return dataHuyen;
        }
    }
}
